package com.situ.day5.bird;

public class BirdDemo {
    public static void main(String[] args) {
        DaYan daYan = new DaYan();
        daYan.fly();
        daYan.egg();
        daYan.print();

        //站在抽象的鸟的角度去看DaYan只能看到egg()
        AbstractBird bird = new DaYan();
        bird.egg();
        bird = new GeZi();
        bird.egg();

        IFly fly = new DaYan();
        fly.fly();
        fly = new GeZi();
        fly.fly();
    }
}
